"""
课程相关
"""
from flask_restful import fields

course_type = {
    'id': fields.Integer,
    'title': fields.String,
    'sequence': fields.Integer,
}

course_fields = {
    'id': fields.Integer,
    'title': fields.String,
    'desc': fields.String,
    'img_path': fields.String,
    'course_type': fields.Integer,
    'follower': fields.String,
    'learner': fields.String,
    'chapters': fields.String
}

chapters_fields = {
    'id': fields.Integer,
    'title': fields.String,
    'serial_num': fields.Integer,
    'course': fields.Integer,
    'sections': fields.String,
    'create_time': fields.DateTime,
    'update_time': fields.DateTime,
    'user_id': fields.Integer,
}

comment_fields = {
    "id": fields.Integer,
    "uid": fields.Integer(attribute='user'),
    "course": fields.Integer,
    "create_time": fields.DateTime,
    "update_time": fields.DateTime,
    "content": fields.String
}